#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pii pair<int,int>
#define pb push_back
#define vec vector<int>
#define y1 y_____hahahaha_____1

using namespace std;

typedef long long ll;
typedef double db;
typedef unsigned long long ull;
typedef long double ldb;

int read(){int x = 0,sgn = 1;char ch = getchar();for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;for(;isdigit(ch);ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ 48); return x * sgn;}

const int N = 510;
const int M = 125010;
const db eps = 1e-9;

int u[M],v[M],deg[N],n,m;
db f[N][N],g[N],h[M];

void Gauss(int n){
	for(int i = 1,j;i <= n;i++){
		int pos = i; for(j = i;j <= n;j++) if(fabs(f[j][i]) > fabs(f[pos][i])) pos = j;
		if(pos ^ i) swap(f[i],f[pos]);
		for(j = 1;j <= n;j++)
			if(j ^ i){
				db d = f[j][i] / f[i][i];
				for(int k = i;k <= n + 1;k++) f[j][k] -= d * f[i][k];
			}
	}
	for(int i = 1;i <= n;i++) g[i] = f[i][n + 1] / f[i][i];
}

int main(){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in,m = in;
	for(int i = 1;i <= m;i++) u[i] = in,v[i] = in,deg[u[i]]++,deg[v[i]]++;
	for(int i = 1;i <= m;i++) if(v[i] < n && u[i] < n) f[u[i]][v[i]] -= 1.0 / deg[v[i]],f[v[i]][u[i]] -= 1.0 / deg[u[i]];
	for(int i = 1;i < n;i++) f[i][i] = 1;
	f[1][n] = 1; Gauss(n - 1);
	for(int i = 1;i <= m;i++) h[i] = g[u[i]] / deg[u[i]] + g[v[i]] / deg[v[i]];
	sort(h + 1,h + m + 1); db ans = 0;
	for(int i = 1;i <= m;i++) ans += h[i] * (m - i + 1);
	printf("%.3lf\n",ans);
	return 0;
}
